Optimal. Leaf size=40 \[ \frac {d \log (\cos (a+b x))}{b^2}+\frac {(c+d x) \tan (a+b x)}{b}-c x-\frac {d x^2}{2} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.03, antiderivative size = 40, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 14, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, Rules used = {3720, 3475} \[ \frac {d \log (\cos (a+b x))}{b^2}+\frac {(c+d x) \tan (a+b x)}{b}-c x-\frac {d x^2}{2} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3475
Rule 3720
Rubi steps
\begin {align*} \int (c+d x) \tan ^2(a+b x) \, dx &=\frac {(c+d x) \tan (a+b x)}{b}-\frac {d \int \tan (a+b x) \, dx}{b}-\int (c+d x) \, dx\\ &=-c x-\frac {d x^2}{2}+\frac {d \log (\cos (a+b x))}{b^2}+\frac {(c+d x) \tan (a+b x)}{b}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.28, size = 76, normalized size = 1.90 \[ \frac {d \log (\cos (a+b x))}{b^2}-\frac {c \tan ^{-1}(\tan (a+b x))}{b}+\frac {c \tan (a+b x)}{b}+\frac {d x \sec (a) \sin (b x) \sec (a+b x)}{b}-\frac {d x \sec (a) (b x \cos (a)-2 \sin (a))}{2 b} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.44, size = 53, normalized size = 1.32 \[ -\frac {b^{2} d x^{2} + 2 \, b^{2} c x - d \log \left (\frac {1}{\tan \left (b x + a\right )^{2} + 1}\right ) - 2 \, {\left (b d x + b c\right )} \tan \left (b x + a\right )}{2 \, b^{2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 0.56, size = 223, normalized size = 5.58 \[ -\frac {b^{2} d x^{2} \tan \left (b x\right ) \tan \relax (a) + 2 \, b^{2} c x \tan \left (b x\right ) \tan \relax (a) - b^{2} d x^{2} - 2 \, b^{2} c x + 2 \, b d x \tan \left (b x\right ) + 2 \, b d x \tan \relax (a) - d \log \left (\frac {4 \, {\left (\tan \left (b x\right )^{4} \tan \relax (a)^{2} - 2 \, \tan \left (b x\right )^{3} \tan \relax (a) + \tan \left (b x\right )^{2} \tan \relax (a)^{2} + \tan \left (b x\right )^{2} - 2 \, \tan \left (b x\right ) \tan \relax (a) + 1\right )}}{\tan \relax (a)^{2} + 1}\right ) \tan \left (b x\right ) \tan \relax (a) + 2 \, b c \tan \left (b x\right ) + 2 \, b c \tan \relax (a) + d \log \left (\frac {4 \, {\left (\tan \left (b x\right )^{4} \tan \relax (a)^{2} - 2 \, \tan \left (b x\right )^{3} \tan \relax (a) + \tan \left (b x\right )^{2} \tan \relax (a)^{2} + \tan \left (b x\right )^{2} - 2 \, \tan \left (b x\right ) \tan \relax (a) + 1\right )}}{\tan \relax (a)^{2} + 1}\right )}{2 \, {\left (b^{2} \tan \left (b x\right ) \tan \relax (a) - b^{2}\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.05, size = 47, normalized size = 1.18 \[ -\frac {d \,x^{2}}{2}-c x +\frac {d \tan \left (b x +a \right ) x}{b}+\frac {d \ln \left (\cos \left (b x +a \right )\right )}{b^{2}}+\frac {c \tan \left (b x +a \right )}{b} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 0.46, size = 237, normalized size = 5.92 \[ -\frac {2 \, {\left (b x + a - \tan \left (b x + a\right )\right )} c - \frac {2 \, {\left (b x + a - \tan \left (b x + a\right )\right )} a d}{b} + \frac {{\left ({\left (b x + a\right )}^{2} \cos \left (2 \, b x + 2 \, a\right )^{2} + {\left (b x + a\right )}^{2} \sin \left (2 \, b x + 2 \, a\right )^{2} + 2 \, {\left (b x + a\right )}^{2} \cos \left (2 \, b x + 2 \, a\right ) + {\left (b x + a\right )}^{2} - {\left (\cos \left (2 \, b x + 2 \, a\right )^{2} + \sin \left (2 \, b x + 2 \, a\right )^{2} + 2 \, \cos \left (2 \, b x + 2 \, a\right ) + 1\right )} \log \left (\cos \left (2 \, b x + 2 \, a\right )^{2} + \sin \left (2 \, b x + 2 \, a\right )^{2} + 2 \, \cos \left (2 \, b x + 2 \, a\right ) + 1\right ) - 4 \, {\left (b x + a\right )} \sin \left (2 \, b x + 2 \, a\right )\right )} d}{{\left (\cos \left (2 \, b x + 2 \, a\right )^{2} + \sin \left (2 \, b x + 2 \, a\right )^{2} + 2 \, \cos \left (2 \, b x + 2 \, a\right ) + 1\right )} b}}{2 \, b} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 1.44, size = 52, normalized size = 1.30 \[ -c\,x-\frac {d\,x^2}{2}-\frac {\frac {d\,\ln \left ({\mathrm {tan}\left (a+b\,x\right )}^2+1\right )}{2}-b\,\left (c\,\mathrm {tan}\left (a+b\,x\right )+d\,x\,\mathrm {tan}\left (a+b\,x\right )\right )}{b^2} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.25, size = 65, normalized size = 1.62 \[ \begin {cases} - c x - \frac {d x^{2}}{2} + \frac {c \tan {\left (a + b x \right )}}{b} + \frac {d x \tan {\left (a + b x \right )}}{b} - \frac {d \log {\left (\tan ^{2}{\left (a + b x \right )} + 1 \right )}}{2 b^{2}} & \text {for}\: b \neq 0 \\\left (c x + \frac {d x^{2}}{2}\right ) \tan ^{2}{\relax (a )} & \text {otherwise} \end {cases} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________